#include "QtCTitleBar.h"
#include "CDefTitle.h"
#include <QVBoxLayout>

QtCTitleBar::QtCTitleBar(QWidget *parent)
    : QWidget(parent)
{
    ui.setupUi(this);
    OnInitDialog();
}

void QtCTitleBar::OnInitDialog()
{
    setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
    CDefTitle* ptitle = new CDefTitle(this);
    ptitle->SetTitleText(QString("fuck"));
    QWidget* pwid = new QWidget(this);
    pwid->setStyleSheet("background-color:yellow");
    QVBoxLayout* playout = new QVBoxLayout;
    playout->addWidget(ptitle);
    playout->addWidget(pwid);
    playout->setSpacing(0);
    playout->setContentsMargins(0, 0, 0, 0);
    setLayout(playout);
}
